class Solution {
public:
    int uniquePaths(int m, int n) {
        int matrix[101][101] = {{0}};
        matrix[0][1] = 1;
        for(int i = 1; i <= m; i++) {
            for(int j = 1; j <= n; j++) {
                matrix[i][j] = matrix[i -1][j] + matrix[i][j -1]; 
            }
        }
        return matrix[m][n];
    }
};